Skip to main content
Version: 4.0

Get Label Category List

Path
http://{supOS ip:port}/open-api/supos/oodm/v2/model-label-types
Query parameters
Table 2. Query parameter description
ParameterTypeDescription
keywordstringFuzzy match the name and alias.
pageIndexintegerRequired. Page number. The default is 1.
pageSizeintegerRequired. The number of data on each page. The default is 20 and the maximum is 500.
Response
  • 200: Successful.
    {
    "code": 200,
    "data": {
    "data": [
    {
    "appAccessMode": "PUBLIC",
    "appName": "system",
    "comment": "this is a test label",
    "displayName": "category1",
    "enName": "labelCategory1",
    "namespace": "system",
    "id": 17777
    }
    ],
    "pageIndex": 1,
    "pageSize": 20,
    "total": 100
    },
    "detail": "string",
    "message": "ok"
    }
  • 500: General internal error of OODM.
    {
    "code": 10001001,
    "data": {},
    "detail": "string",
    "message": "string"
    }

Create Label Category

Path
http://{supOS ip:port}/open-api/supos/oodm/v2/model-label-types
Request Body
{
"appAccessMode": "PUBLIC", //whether can be seen in other apps (PUBLIC or PRIVATE). Required.
"appName": "system", //required
"comment": "this is a test label",
"displayName": "category1",
"enName": "labelCategory1", //label alias
"namespace": "system"
}
Response
  • 200: Successful.
    {
    "code": 200,
    "data": 19999,
    "detail": "string",
    "message": "ok"
    }
  • 500: General internal error of OODM.
    {
    "code": 10001001,
    "data": {},
    "detail": "string",
    "message": "string"
    }

Get Label/Category

Path
http://{supOS ip:port}/open-api/supos/oodm/v2/model-label-types/{namespace}/{name}
  • namespace: Label namespce. Required. String.
  • name: Label alias. Required. String.
Response
  • 200: Successful.
    {
    "code": 200,
    "data": {
    "appAccessMode": "PUBLIC",
    "appName": "system",
    "comment": "this is a test label",
    "displayName": "category1",
    "enName": "labelCategory1",
    "namespace": "system",
    "id": 17778
    },
    "detail": "string",
    "message": "ok"
    }
  • 500: General internal error of OODM.
    {
    "code": 10001001,
    "data": {},
    "detail": "string",
    "message": "string"
    }

Get All Labels

Path
http://{supOS ip:port}/open-api/supos/oodm/v2/model-labels
Query parameters
Table 2. Query parameter description
ParameterTypeDescription
keywordstringFuzzy match the name and alias.
pageIndexintegerRequired. Page number. The default is 1.
pageSizeintegerRequired. The number of data on each page. The default is 20 and the maximum is 500.
categoryIdintegerLabel category ID.
metadataTypestringMetadata type, including ATTRIBUTE, EVENT, SERVICE and SUBSCRIPTION.
excludeMetadatabooleanWhether to exclude all labels of the metadata. Used together with metadataType.
templateNamestringTemplate alias. Input with templateNamespace and used together with metadataType.
templateNamespacestringTemplate namespace. Input with templateName.
instanceNamestringInstance alias. Used with metadataType.
Response
200: Successful.
{
"code": 200,
"data": {
"data": [
{
"appAccessMode": "PUBLIC",
"appName": "system",
"comment": "this is a test label",
"displayName": "category1",
"enName": "labelCategory1",
"namespace": "system",
"id": 17777
}
],
"pageIndex": 1,
"pageSize": 20,
"total": 100
},
"detail": "string",
"message": "ok"
}

Create Label

Path
http://{supOS ip:port}/open-api/supos/oodm/v2/model-labels
Request Body
{
"appAccessMode": "PUBLIC", //whether can be seen in other apps (PUBLIC or PRIVATE). Required.
"appName": "system",
"comment": "this is a test label",
"displayName": "category1",
"enName": "labelCategory1",
"namespace": "system",
"categoryId": 17777 //interger. Required.
}
Response
  • 200: Successful.
    {
    "code": 200,
    "data": 19999,
    "detail": "string",
    "message": "ok"
    }
  • 500: General internal error of OODM.
    {
    "code": 10001001,
    "data": {},
    "detail": "string",
    "message": "string"
    }

Cancel Instance Label

Path
http://{supOS ip:port}/open-api/supos/oodm/v2/model-labels/{templateNamespace}/{templateName}/instance-labels
Request Body
{
"instanceNames": [ //instance name list
"instance1"
],
"labelIds": [
14444
]
}
Response
  • 200: Successful.
    {
    "code": 200,
    "message": "ok",
    "data": null,
    "detail": null
    }
  • 500: General internal error of OODM.
    {
    "code": 10001001,
    "data": {},
    "detail": "string",
    "message": "string"
    }

Add Instance Label

Path
http://{supOS ip:port}/open-api/supos/oodm/v2/model-labels/{templateNamespace}/{templateName}/{instanceName}/instance-labels
Request Body
{
"instanceId": "10001",
"labelIds": [
12222
],
"relationId": 12333,
"templateId": 12332
}
Response
  • 200: Successful.
    {
    "code": 200,
    "message": "ok",
    "data": null,
    "detail": null
    }
  • 500: General internal error of OODM.
    {
    "code": 10001001,
    "data": {},
    "detail": "string",
    "message": "string"
    }